package com.bgIntlgn.client.entity.warehourse;

import yuhuibear.poat.annotations.relation.View;
import yuhuibear.poat.object.bean.Bean;

/**
 * 按Element.id 统计的库存上下限信息。
 * 
 * @author Simon Chen
 * 
 */
@View(name = "elementstorage_limit", sqlToCreate = "select es.element_id as element_id, alias.name as name, sum(sl.lower_limit)  as lower_limit, "
		+ "sum(sl.upper_limit)  as upper_limit "
		+ "from storage_limits as sl, element_subversions as es, alias, elements  "
		+ "where sl.uid=es.uid and es.element_id=elements.id and alias.element_id = elements.id "
		+ "group by es.element_id, alias.name;")
public class ElementStorageLimit implements Bean {

	private Long elementId;
	private String name;
	private Integer lowerLimit;
	private Integer upperLimit;

	public Long getElementId() {
		return elementId;
	}

	public void setElementId(Long elementId) {
		this.elementId = elementId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getLowerLimit() {
		return lowerLimit;
	}

	public void setLowerLimit(Integer lowerLimit) {
		this.lowerLimit = lowerLimit;
	}

	public Integer getUpperLimit() {
		return upperLimit;
	}

	public void setUpperLimit(Integer upperLimit) {
		this.upperLimit = upperLimit;
	}
}
